Understanding Link Alternatives

Description

One-to-One Links and One-to-Many Links

One-to-One Links

A one-to-one link describes a relationship in which there is only one matching child for each parent record. In the case of the Invoice set, the invoice and customer tables have a one-to-one relationship. For each invoice there can only be one customer. The link between the Invoice table and the Customer table is the Cust_NO field which is contained in both the Invoice table and the Customer table. When you create a set in Alpha Anywhere, the Set Editor displays the set's structure using a set diagram. In the diagram, one-to-one links are shown as a single line between the parent and the child.

One-to-Many Links

A one-to-many link describes a relationship in which there can be multiple matching records for each parent record. In the case of the Invoice set, the invoice and items tables have a one-to-many relationship. For each invoice there can be multiple line items. The link between the Invoice table and the Items table is the Inv_No field which is contained in both the Invoice and Items databases In the Alpha Anywhere Set Editor, one-to-many links are shown as a double line between the parent and the child. One-to-many links can be used with Alpha Anywhere's referential integrity. This feature helps ensure that child records do not become unlinked from their parent. For more information, refer to Referential Integrity in the previous section.

See Also